<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>config对象</title>
</head>
<body>
我还好
<%
//获取servlet上下文
String context=config.getServletContext().toString();

//获取servlet服务器名
String name=config.getServletName();

//获取服务器所有初始参数名称,返回值为Enumeration对象
Enumeration<String> a=config.getInitParameterNames();


%>
<%=context+"," %>
<%=name %>
</body>
</html>